package com.caigou.mapper.cms;


import com.caigou.bean.cms.entity.Comment;
import com.caigou.bean.cms.param.CommentFilterParam;
import com.caigou.bean.cms.param.CommentQueryParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CommentMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    List<Comment> findCommentByCommentTargetId(String commentTargetId);

    int deleteCommentByCommentId(String commentId);

    List<Comment> findCommentByParam(CommentFilterParam param);

    Comment findCommentByCommentId(String commentId);

    Integer loadCommentCountByArticle(@Param("articleId") String articleId);

    List<Comment> listComment(CommentQueryParam param);

    List<Comment> listMyComment(@Param("userId") String userId);
}